package cn.gson.crm.controller.counselor;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.StudentDao;

@WebServlet("/change/grade")
public class CounselorChangeStuGrade extends BaseServlet{
	/**
	 * 改变用户等级
	 */
	private static final long serialVersionUID = 1L;
	private StudentDao stuDao = new StudentDao();
	@Override
	protected void post(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String stuId = request.getParameter("stuId");
		//修改用户等级
		String gradeId= request.getParameter("gradeId");
		if(!gradeId.isEmpty()&&gradeId!=null){
			stuDao.changeStuGrade(gradeId, stuId);
		}
		redirect("customer/detail?id="+stuId);
	}
}
